﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Electrical;
using Autodesk.Revit.DB.Mechanical;
using Autodesk.Revit.DB.Plumbing;
using Autodesk.Revit.UI.Selection;

namespace YArchitech.Revit
{
	public class RectangleSelectFilter : ISelectionFilter
	{
		bool ISelectionFilter.AllowElement(Element elem)
		{
			return (elem is Pipe && !YJKRevitTools.isRiserPipe(elem as Pipe)) || (elem is Duct && !YJKRevitTools.IsRiserDuct(elem as Duct)) || (elem is Conduit && !YJKRevitTools.isRiserConduit(elem as Conduit)) || (elem is CableTray && !YJKRevitTools.isRiserCableTray(elem as CableTray));
		}

		bool ISelectionFilter.AllowReference(Reference reference, XYZ position)
		{
			throw new NotImplementedException();
		}
	}
}
